package com.campusevaluation.common.constant;

/**
 * 限制类型常量
 */
public class FormatConstant {
    public static final Integer NONE = 0;
    public static final Integer EMAIL = 1;
    public static final Integer PHONE = 2;
    public static final Integer NUMBER = 3;
    public static final String EMAIL_PATTERN =
            "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$";
    public static final String PHONE_PATTERN =
            "^1[3-9]\\d{9}$"; // 中国手机号格式
    public static final String NUMBER_PATTERN =
            "^-?\\d+(\\.\\d+)?$"; // 支持整数和小数
}
